package com.infra.micro.id.domain.mapper.ext;

import org.apache.ibatis.annotations.Update;

public interface IdSegmentExtMapper {
    @Update("UPDATE id_segment SET max_id = max_id + step WHERE app_id = #{appId}")
    int updateMaxIdByAppId(Integer appId);

    @Update("UPDATE id_segment SET max_id = max_id + #{nextStep} WHERE app_id = #{appId}")
    int updateMaxIdByStepAndGet(Integer appId, int nextStep);
}
